<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/ukkepuk/source/php/classes/model/Calendar.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/ukkepuk/source/php/classes/model/AbstractEntity.php'); 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CalendarDayparts
 *
 * @author virtual
 */
class CalendarDayparts  extends Calendar{
    private $dayparts = array();
    
    public function getDayparts() { return $this->dayparts; }
    
    public function setDayparts($dayparts) { $this->dayparts = $dayparts; }
    
    public function addDaypart($daypart){
        array_push($this->dayparts, $daypart);
    }
    
    //HELPER METHODS
    public function getRegisteredDay(){
        
       return $this->booleanToYesNo(count($this->dayparts) > 0);
    }
}

class Daypart extends AbstractEntity {
    private $startTime;
    private $endTime;
    
    public function getStartTime() {  return $this->startTime;    }
    public function getEndTime() {  return $this->endTime;    }
    
    public function setStartTime($startTime) { $this->startTime = $startTime; }
    public function setEndTime($endTime) { $this->endTime = $endTime; }
    
}

?>
